<div>
    <table id="tabla">
        <thead>
            <tr>
                <th style="width: 25%">Producto</th>
                <th style="width: 15%">Tipo</th>
                <th style="width: 10%">Cantidad</th>
                <th style="width: 15%">Valor cotizado</th>
                <th style="width: 15%">Valor real</th>
                <th style="width: 20%">Opciones</th>
            </tr>
        </thead>
        <tbody>
            <?php
            $total = 0;
            $total_ejecutado = 0;
            foreach ($products as $product):
                ?>
                <tr>
                    <td><?php echo $product['Product']['nombre']; ?></td>
                    <td><?php echo $product['Product']['tipo']; ?></td>
                    <td><?php echo $product['Product']['cantidad']; ?></td>
                    <td><?php
            echo '$ ' . number_format($product['Product']['valor_total'], 2, '.', ',');
            $total += $product['Product']['valor_total']
                ?></td>
                    <td><?php
                    echo '$ ' . number_format($product['Product']['valor_real'], 2, '.', ',');
                    $total_ejecutado += $product['Product']['valor_real']
                ?></td>
                    <td>
                        <br>
                        <?php echo $this->Ajax->link('Editar', array('controller' => 'Products', 'action' => 'edit_ejecucion', $product['Product']['id']), array('update' => 'content', 'indicator' => 'loading', 'class' => 'actions')); ?>
                        <br>
                        <br>
                    </td>
                </tr>
                <?php
            endforeach;
            ?>
            <tr>
                <td></td>
                <td></td>
                <td><b>TOTAL:</b></td>
                <td><b><?php echo '$ ' . number_format($total, 2, '.', ','); ?></b></td>
                <td><b><?php echo '$ ' . number_format($total_ejecutado, 2, '.', ','); ?></b></td>
                <td></td>
            </tr>
        </tbody>
    </table>
</div>  
<br>
<br><br>
<?php
echo $ajax->link($html->image('regresar.gif', array('width' => '30', 'heigth' => '30', 'alt' => 'Regresar', 'title' => 'regresar')), array('controller' => 'OperatingPlans', 'action' => 'index_committee_ejecucion'), array('update' => 'content', 'indicator' => 'loading', 'escape' => false));
?>